home *** CD-ROM | disk | FTP | other *** search
- Path: sun001.spd.dsccc.com!spd!jmccarty
- From: jmccarty@spd.dsccc.com (Mike McCarty)
- Newsgroups: comp.lang.c
- Subject: Re: What to do when feof() is NOT feof()
- Date: 20 Feb 1996 01:23:47 GMT
- Organization: DSC Communications Corporation, Plano, Texas USA
- Message-ID: <4gb7r3$p4k@sun001.spd.dsccc.com>
- References: <4g7rsj$fnf@spectator.cris.com> <1996Feb19.063026.29889@zcon.com>
- NNTP-Posting-Host: aplo139.spd.dsccc.com
-
- In article <1996Feb19.063026.29889@zcon.com>,
- Syed Zaeem Hosain <szh@zcon.com> wrote:
-
- )I would have to differ. Dan has always offered *correct* advice when it
- )is called for. While I do not necessarily always agree with his way of
- )doing so, his point here is still well taken.
-
- This is false. On more than one occasion Dan has posted incorrect
- information, and when challenged either just silently gone away, or
- responded with verbal abuse.
-
- )When somebody is asking a question about something (that they are
- )obviously unknowledgable or confused about), giving them incorrect
- )answers only propagates the confusion. So please don't guess, please
- )don't offer any incorrect suggestions, please don't confuse them
- )further, etc.
-
- I think that guessing can be very helpful, myself. Especially when a
- newbie has asked a "fuzzy" question. Then guessing things like
-
- I think that you are using an MSDOS machine; if so then...
-
- or
-
- assuming you meant ... then ...
-
- can be very useful. And in any case, where does the charter of this
- newsgroup state that only bona fide, certified, Dan Pop-a-fied experts
- are allowed to post responses? This is an UNMODERATED newsgroup.
-
- )>I may not be an expert but I know if you open a file with fopen(
- )>"filename", "rt"), then fgets stops reading when it finds a ascii 26 and
- )>signals end-of-file. If you open it with fopen( "filename","rb") it reads until
- )>the real end-of-file. I noticed in your smart-ass reply you did not offer any
- )>answers to his problem. Maybe you should take you own advice.
- )
- )On my SunOS system, there is no such ascii 26 byte denoting end of file
- )and fgets will *not* terminate in this manner. The point is that by
- )making such incorrect responses (like you did by insisting on this
- )point) is just plain wrong. It has nothing to do with the language or
- )how the end of files are denoted in most operating systems. Even in
- )PC's running MSDOS, there is no such requirement that there *must* be
- )an ascii 26 at the end of text files. Certain editors (Brief is an
- )example. microEMacs is another) can easily be configured to create such
- )ascii files without this byte.
-
- His response is not incorrect. It is just incomplete. There is a
- difference. But calling someone an idiot is incorrect.
-
- )Note that even the EOF result returned (look in stdio.h) has nothing to
- )do with the actual byte at the end of the file.
-
- Yes, it does, on some systems. This is a very strong statement for you
- to make, especially in light of the next statement.
-
- )The bottom line still is: please do not offer answers if you do not
- )know the correct answer.
-
- Ah, I see. Do as I say, not as I do. Since you offered answers here
- which are not correct.
-
- It would be a lot calmer and more fun to read this group if people could
- treat each other with a normal dose of courtesy.
-
- Mike
- ----
- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
-
- I don't speak for DSC. <- They make me say that.
-